package com.designPattern.p05StaticProxy;

/**
 * 代理类
 *
 * @author luhd
 * @date 2022-05-08
 */
public class TeachDaoProxy implements ITeachDao{

    private ITeachDao teachDao;

    /**
     * 构造器
     */
    public TeachDaoProxy (ITeachDao teachDao) {
        this.teachDao = teachDao;
    }

    @Override
    public void teach() {
        //todo 做一些扩展操作
        System.out.println("一系列代理操作");
        teachDao.teach();
        System.out.println("方法完成！");
    }
}
